Smoothsort's Behavior on Presorted Sequences

نویسنده

  • Stefan Hertel
چکیده

In [5], Mehlhorn presented an algorithm for sorting nearly sorted sequences of length n in time 0(n(1+log(F/n») where F is the number of initial inversions. More recently, Dijkstra[3] presented a new algorithm for sorting in situ. Without giving much evidence of it, he claims that his algorithm works well on nearly sorted sequences. In this note we show that smoothsort compares unfavorably to Mehlhorn's algorithm. We present a sequence of length n with O(nlogn) inversions which forces smoothsort to use time Q(nlogn), contrasting to the time o (nloglogn) Mehlhorn's algorithm would need.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Sorting Presorted Files

A new sorting algorithm is presented. Its running time is O(n(1+10g(F/n)) where F = I{(f,j); i < j and xi < xj}1 is the total number of inversions in the input sequence xn xn_1 xn_2 ... x2 xl· In other words, presorted sequences are sorted quickly, and completely unsorted sequences are sorted in O(n log n) steps. Note that F < n2/2 always. Furthermore, the constant of proportionality is fairly ...

متن کامل

On the Negation-Limited Circuit Complexity of Merging

A negation-limited circuit is a combinational circuit that consists of AND, OR gates and a limited number of NOT gates. In this paper, we investigate the complexity of negation-limited circuits. The (n; n) merging function is a function that merges two presorted binary sequences x 1 x n and y 1 y n into a sequence z 1 z 2n . We prove that the size complexity of the (n; n) merging function with ...

متن کامل

Revisiting Visibility in the Plane

We consider two closely related problems: computing the region visible from a point amid simple polygonal obstacles and computing the lower envelope of a set of disjoint segments. Visibility problems such as these were proposed and promptly solved in the late ’80s and early ’90s before the widespread popularity of the word RAM model. All previously published algorithms thus run in Ω(n log n) ti...

متن کامل

Performance Improvement Technique in Column-Store

Column-oriented database has gained popularity as Data Warehousing data and performance issues for Analytical Queries have increased. Each attribute of a relation is physically stored as a separate column, which will help analytical queries to work fast. The overhead is incurred in tuple reconstruction for multi attribute queries. Each tuple reconstruction is joining of two columns based on tup...

متن کامل

Dynamic Simulation of Distillation Sequences in Dew Pointing Unit of South Pars Gas Refinery

The understanding of the dynamic behavior of distillation columns has received considerable attention because distillation is one of the most widely used unit operations in chemical process industries. This paper reports a dynamic simulation study of the possible distillation columns sequences of Dew pointing unit in the second phase of South Pars Gas Refinery. In this unit, three columns are u...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Inf. Process. Lett.

دوره 16  شماره 

صفحات  -

تاریخ انتشار 1983